<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="p" uri="/WEB-INF/tld/page.tld" %>
<script type="text/javascript">
function turnpage(pageNo) {
	$("#user-div").load("/course/userPage?pageNo="+pageNo);
}
</script>
<table class="table responsive-table" id="user-table">
	<thead>
		<tr>
			<th scope="col">&emsp;</th>
			<th scope="col">用户名</th>
			<th scope="col">类型</th>
			<th scope="col">性别</th>
		</tr>
	</thead>
	
	<!-- <tfoot>
		<tr>
			<td colspan="6">
				6 entries found
			</td>
		</tr>
	</tfoot> -->
	
	<tbody>
		<c:forEach items="${userPage.list }" var="user">
		<tr>
			<td><input type="radio" name="userId" value="${user.id }"
				onclick='selectUser("${user.id}", "${user.username }")'></td>
			<td>${user.username }</td>
			<td>${user.type_display }</td>
			<td>${user.sex_display }</td>
		</tr>
		</c:forEach>
	</tbody>
</table>
<div class="dataTables_footer">
	<div class="dataTables_info" id="sorting-advanced_info">
		第${userPage.pageNumber }/${userPage.totalPage }页
</div>
<p:page totalRow="${userPage.totalRow }" pageNumber="${userPage.pageNumber }" 
	totalPage="${userPage.totalPage }"/>
</div>
